﻿@model Adams.Web.Models.Sitemap.Index.PageLoad
@{
    Layout = "~/Views/Shared/_AppLayout.Mobile.cshtml";
}
@section Head{
    <link href="/Content/Sitemap/index.css" rel="stylesheet" type="text/css" />
}
<h1>
    Sitemap</h1>
@ShowNodes(Model.Node, true)
@helper ShowNodes(Adams.Shared.Entities.Sitemap.Node node, bool isHome)
    {   
    if (node.ChildNodes.Count > 0)
    {
        var count = 0;
    <ul class="@(isHome ? "lister" : "lister2")">
        @foreach (var n in node.ChildNodes)
        {
            count++;
            <li class="@(isHome ? "level1" : "level2")"><a href="@n.Url">@n.Title</a>
                @ShowNodes(n, false)
            </li>
            if (count % 5 == 0)
            {
            <div style="clear: both;"> </div>
            }
        }
    </ul>
    }
}
<div style="clear: both;"> </div>
@section Scripts {
}
